/*    */ package com.zimbra.cs.service.mail;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.Element;
/*    */ import com.zimbra.cs.account.Account;
/*    */ import com.zimbra.cs.mailbox.MailSender;
/*    */ import com.zimbra.cs.mailbox.Mailbox;
/*    */ import com.zimbra.cs.mailbox.OperationContext;
/*    */ import com.zimbra.soap.ZimbraSoapContext;
/*    */ import java.util.Map;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class DeclineCounterCalendarItem
/*    */   extends CalendarRequest
/*    */ {
/*    */   private class InviteParser
/*    */     extends ParseMimeMessage.InviteParser
/*    */   {
/*    */     private InviteParser() {}
/*    */     
/*    */     public ParseMimeMessage.InviteParserResult parseInviteElement(ZimbraSoapContext lc, OperationContext octxt, Account account, Element inviteElem)
/*    */       throws ServiceException
/*    */     {
/* 37 */       return CalendarUtils.parseInviteForDeclineCounter(account, DeclineCounterCalendarItem.this.getItemType(), inviteElem);
/*    */     }
/*    */   }
/*    */   
/*    */   public Element handle(Element request, Map<String, Object> context) throws ServiceException
/*    */   {
/* 43 */     ZimbraSoapContext zsc = getZimbraSoapContext(context);
/* 44 */     Account acct = getRequestedAccount(zsc);
/* 45 */     Mailbox mbox = getRequestedMailbox(zsc);
/* 46 */     OperationContext octxt = getOperationContext(zsc, context);
/*    */     
/* 48 */     Element msgElem = request.getElement("m");
/* 49 */     InviteParser parser = new InviteParser(null);
/* 50 */     CalendarRequest.CalSendData dat = handleMsgElement(zsc, octxt, msgElem, acct, mbox, parser);
/*    */     
/* 52 */     MailSender mailSender = mbox.getMailSender();
/* 53 */     mailSender.sendMimeMessage(octxt, mbox, dat.mMm);
/* 54 */     Element response = getResponseElement(zsc);
/* 55 */     return response;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/mail/DeclineCounterCalendarItem.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */